<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script src="<%=basePath %>js/jquery-1.4.2.min.js"></script>
	<link rel="stylesheet" type="text/css" href="<%=basePath %>css/pic.css" />
<script type="text/javascript">
$(function() {
	 var maxWidth = 160;  
     var maxHeight = 160;
     var curWidth  = $(".iterms img").width();  
     var curHeight = $(".iterms img").height();  
     if(curWidth > maxWidth){  
          $(".iterms img").width(maxWidth);  
     }  
     if(curHeight > maxHeight){  
          $(".iterms img").height(maxHeight);  
     }
});
</script>
</head>
<body>
	<div class="content">
		<div class="content2">
			<div class="main">
				<div class="main-content">
				
					<div class="toolbar">
					  <div id="fanhui"><a style="cursor:pointer" href="<%=basePath %>adminIndex.action">返回</a> </div>
						<ul>
							<li><a>${pageBean.currentPage }/${pageBean.totalPage }</a></li>
							<c:if test="${pageBean.currentPage != 1}">
								<li><a href="pictureAction!findInfoAll?page=${pageBean.currentPage-1}">Prev</a></li>
							</c:if>
							<c:if test="${pageBean.currentPage != pageBean.totalPage }">
								<li><a href="pictureAction!findInfoAll?page=${pageBean.currentPage+1}">Next</a></li>
							</c:if>
						</ul>
					</div>
					<div class="iterms">
						<c:forEach items="${pageBean.list}" var="picture">
								<img src="<%=basePath %>${picture.url}" alt="${picture.picName }" class="pictureURL iterm"/>
								<div class="del">
									<img src="images/admin/del.gif"/>
									<a href="pictureAction!delete?picture.id=${picture.id}">删除</a>
								</div>
						</c:forEach>
					</div> <!-- iterms -->
				</div> <!-- main-content -->
			</div> <!-- main -->
		</div>
			<div class="toolbar">
						<ul>
							<li><a>${pageBean.currentPage }/${pageBean.totalPage }</a></li>
							<c:if test="${pageBean.currentPage != 1}">
								<li><a href="pictureAction!findInfoAll?page=${pageBean.currentPage-1}">Prev</a></li>
							</c:if>
							<c:if test="${pageBean.currentPage != pageBean.totalPage }">
								<li><a href="pictureAction!findInfoAll?page=${pageBean.currentPage+1}">Next</a></li>
							</c:if>
						</ul>
				</div>
	</div> <!-- contetn -->
</body>
</html>